#pragma once

//--------------------------------------------------

// interface only support public inheritance
interface class IBase
{
};
//ref class Derived1 : private IBase {}; 
//ref class Derived2 : protected IBase {}; 
ref class Derived : IBase {}; //public assumed

//-------------------------------------------------

// value types can only inherit from interface classes
ref class RefBase {};
value class ValBase {};
interface class IBase2 {};

//value class Derived1 : RefBase {}; //error C3830
//value class Derived2 : ValBase {}; //error C3830
value class Derived1 : IBase {};

//---------------------------------------------------

// explict implement for the interface
interface class IPrint
{
	void Print();
};

interface class IPrint1
{
	void Print1();
};

interface class IPrint2
{
	void Print2();
};

interface class IPrint3 : IPrint1, IPrint2
{
	void Print();
};

ref class MyPrintR :  IPrint1, IPrint2
{
public:
	virtual void Print1() = IPrint1::Print1
	{} ;
	virtual void Print2() override
	{} ;
};

value class MyPrintV :IPrint, IPrint3
{
public:
	virtual void Print() = IPrint::Print
	{} ;
	virtual void Print1() override
	{} ;
	virtual void Print2() 
	{} ;
};

//---------------------------------------------------

// an unmanaged type cannot derive from a managed type
//class MyTestN : public IPrint1, IPrint2{};

//---------------------------------------------------



